#include <iostream>
#include <unistd.h>
#include "Thread.hpp"
#include <time.h>
#include <memory>

using std::cout;
using std::endl;
using std::unique_ptr;

class MyThread
:public wd::Thread
{
    void run() override{
        srand(time(nullptr));
        int cnt = 10;
        while(cnt--){
            int number = rand() % 100;
            cout << "produce num:" << number <<endl;
            sleep(1);
        }
    }
};
int main()
{
    unique_ptr<wd::Thread> thread(new MyThread);
    thread->start();
    thread->join();

    printf("main is running\n");
    return 0;

    return 0;
}

